The Person::print() method outputs the values of the instance variables.
As mentioned earlier, printf() accepts a character string as its first argument, followed by an appropriate list of arguments. The characters '%d' contained in the string specify that an integer value is to be printed in this location, in this case the value represented by the variable age or the variable weight.